//
//  GoodsDetaCollctionCell.m
//  NormalFramework
//
//  Created by beisheng03 on 2018/3/17.
//  Copyright © 2018年 beisheng. All rights reserved.
//

#import "GoodsDetaCollctionCell.h"
#import "GoodsDetaItemCell.h"
@interface GoodsDetaCollctionCell ()<UICollectionViewDelegate,UICollectionViewDataSource>

@property (weak, nonatomic) IBOutlet UICollectionView *myCollectionView;

@end

@implementation GoodsDetaCollctionCell

- (void)awakeFromNib {
    [super awakeFromNib];
    [self.myCollectionView registerNib:[UINib nibWithNibName:NSStringFromClass([GoodsDetaItemCell class]) bundle:nil] forCellWithReuseIdentifier:[GoodsDetaItemCell identifierStr]];
    self.myCollectionView.scrollEnabled = NO;
    self.myCollectionView.delegate = self;
    self.myCollectionView.dataSource = self;
    self.contentView.backgroundColor = lineGray;
}





- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
    
    
    return 3;
    
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
    
    GoodsDetaItemCell *cell = (GoodsDetaItemCell *)[collectionView dequeueReusableCellWithReuseIdentifier:[GoodsDetaItemCell identifierStr] forIndexPath:indexPath];
    
    
    return cell;
    
}

- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{

    
    if (indexPath.item == 0) {
        
        [self.viewController.navigationController pushViewController:[[BaseViewController alloc]init] animated:YES];
        
    } else if (indexPath.item == 1){
        
        [self.viewController.navigationController pushViewController:[[BaseViewController alloc]init] animated:YES];

        
    }else{
        
        [self.viewController.navigationController pushViewController:[[BaseViewController alloc]init] animated:YES];

        
    }
    
    
}






- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
